/**
 * Copyright (c) 快宝网络 kuaidihelp.com Co., Ltd. All Rights Reserved 禁止外泄以及用于其它的商业用途
 */

import { Request, Response } from 'express';
import { ResponseItem, responseSuccess } from '../utils';
import type { ListItem } from '@/pages/HandleFeedback/courier/index.d';
import Mock from 'mockjs';

export default {
  'POST /courier/feedbackList': (req: Request, res: Response) => {
    const data: ListItem[] = Mock.mock({
      'list|1-30': [
        {
          id: '@id()',
          app: 'android 5.3.9',
          content: '测试测试测试',
          images: [
            'https://osscdn-kbad.kuaidihelp.com/admin/ad/2022/05/09/6278cc3fa0df4/after.png',
            'https://osscdn-kbad.kuaidihelp.com/admin/ad/2022/05/09/6278cc3fa0df4/after.png',
          ],
          reply_images: [
            'https://osscdn-kbad.kuaidihelp.com/admin/ad/2022/05/09/6278cc3fa0df4/after.png',
            'https://osscdn-kbad.kuaidihelp.com/admin/ad/2022/05/09/6278cc3fa0df4/after.png',
            'https://osscdn-kbad.kuaidihelp.com/admin/ad/2022/05/09/6278cc3fa0df4/after.png',
          ],
          inn_id: '2225710',
          phone: '18516011018',
          reply_type: '0',
          type: '1',
          update_time: '2022-04-02 17:35:31',
          courier_id: '428220',
          create_at: '2021-11-09 15:58:48',
          reply: '亲，您的问题描述的不够清晰，客服无法解答，如有疑问请加客服微信：kuaibao168',
          reply_user: '18505650937',
          source: '1',
          status: '0',
          status_desc: '已忽略',
          type_desc: '性能问题',
          update_at: '2022-05-06 17:29:09',
        },
      ],
    });

    const result: ResponseItem = {
      code: 0,
      msg: '成功',
      data,
    };
    return res.json(result);
  },
  'POST /courier/feedbackReply': (req: Request, res: Response) => responseSuccess(req, res),
};
